from flask import Flask
import main_process

server = Flask(__name__)


@server.route('/object_recognition', methods=['POST'])
def object_recognition():
    main_process.inference()
    return main_process.return_jsonify()


@server.route('/object_detention', methods=['POST'])
def object_detention():
    main_process.inference()
    return main_process.return_jsonify()


@server.route('/pose', methods=['POST'])
def pose():
    main_process.inference()
    return main_process.return_jsonify()


@server.route('/overlap', methods=['POST'])
def overlap():
    main_process.inference()
    return main_process.return_jsonify()


@server.route('/cam_frame_shot', methods=['POST'])
def cam_frame_shot():
    main_process.cam_frame_shot()
    return main_process.return_jsonify()


@server.route('/model_file', methods=['POST'])
def model_file():
    return main_process.model_file()


if __name__ == "__main__":
    server.run(host='0.0.0.0', port=5000, debug=True)
